package cn.cnsuh.剑指offer.q11_旋转数组的最小数字;

/**
 * created by mzk on 2020/07/22
 */
public class Main {
     int minArray(int[] numbers) {
        int l = 0, r = numbers.length-1;
        while(l < r){
            int mid = (l+r) >> 1;
            if(numbers[mid] > numbers[r]){
                l = mid + 1;
            }else if(numbers[mid] < numbers[r]){
                r = mid;
            }else{
                r --;
            }
        }
        return numbers[l];
    }
}
